/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author lzw
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';
import { UploadApiResult } from '../sys/upload';
import { UploadFileParams } from '/#/axios';

const { ctxPath, adminPath } = useGlobSetting();

export interface FtdsAzj extends BasicModel<FtdsAzj> {
  azjShmc?: string; // 商户名称
  azjDdh?: string; // 订单号
  azjZwrxm?: string; // 债务人姓名
  azjZwrlxdh?: string; // 债务人联系电话
  azjZwrsfzh?: string; // 债务人身份证号
  azjZwrsfzdz?: string; // 债务人身份证地址
  azjZwrmz?: string; // 债务人民族
  azjZwrtxdz?: string; // 债务人通讯地址
  azjDdqyj?: string; // 订单签约价
  azjDdmdj?: string; // 订单买断价
  azjFqqs?: string; // 分期期数
  azjYzj?: string; // 月租金
  azjYqqs?: string; // 逾期期数
  azjYqbj?: string; // 逾期本金
  azjZnj?: string; // 滞纳金
  azjWyj?: string; // 违约金
  azjZyrq?: string; // 租用日期
  azjSjxh?: string; // 手机型号
  azjFhrq?: string; // 发货日期
  azjWldh?: string; // 物流单号
  azjQsrq?: string; // 签收日期
  azjYqrq?: string; // 逾期日期
  azjJjlxr?: string; // 紧急联系人
}

export const ftdsAzjList = (params?: FtdsAzj | any) =>
  defHttp.get<FtdsAzj>({ url: adminPath + '/ftds/ftdsAzj/list', params });

export const ftdsAzjListData = (params?: FtdsAzj | any) =>
  defHttp.post<Page<FtdsAzj>>({ url: adminPath + '/ftds/ftdsAzj/listData', params });

export const ftdsAzjForm = (params?: FtdsAzj | any) =>
  defHttp.get<FtdsAzj>({ url: adminPath + '/ftds/ftdsAzj/form', params });

export const ftdsAzjSave = (params?: any, data?: FtdsAzj | any) =>
  defHttp.postJson<FtdsAzj>({ url: adminPath + '/ftds/ftdsAzj/save', params, data });

export const ftdsAzjImportData = (
  params: UploadFileParams,
  onUploadProgress: (progressEvent: ProgressEvent) => void,
) =>
  defHttp.uploadFile<UploadApiResult>(
    {
      url: ctxPath + adminPath + '/ftds/ftdsAzj/importData',
      onUploadProgress,
    },
    params,
  );

export const ftdsAzjDelete = (params?: FtdsAzj | any) =>
  defHttp.get<FtdsAzj>({ url: adminPath + '/ftds/ftdsAzj/delete', params });
